
$.ajaxPrefilter(function (config) {
    config.url = "http://localhost:8080/api/v1" + config.url;
    config.headers = {
        Authorization: localStorage.getItem("token")
    }
    let loadIndex;
    // 定义发送前
    config.beforeSend = function () {
        loadIndex = layer.load(2);
    }
    // 定义完成后
    config.complete = function () {
        layer.close(loadIndex);
    }
})
